home *** CD-ROM | disk | FTP | other *** search
Wrap
-- Movie Go to/Play -- Either 'goes to' a movie or 'plays' a movie. Goto won't return and play returns when the -- movie runs into 'playdone' in a lingo handler. Use the Play Done behavior in the called -- movie to create this action. -- -- also functions through lingo by handling message 'initGotoMovie', -- for example if this behavior was assigned to sprite 5, use -- sendsprite 5, #initGotoMovie property movieName, playMode, whichEvent on initGotoMovie me init me end on mouseUp me if whichEvent = #mouseup then init me end on prepareFrame me if whichEvent = #prepareframe then init me end on exitFrame me if whichEvent = #exitframe then init me end on init me set the movieName of me = get_filename( movieName ) case ( playMode ) of: #"Go to": go to movie movieName #"Play and Return": play movie movieName end case end --- on get_filename f_name -- don't force user to remember the extension if NOT ( f_name contains ".dir" ) then set f_name = f_name & ".dir" end if -- support relative pathnames if (( f_name contains "/" ) OR ¬ ( f_name contains "\" )) then if ( NOT f_name contains ":" ) then set f_name = the pathname & f_name end if end if return( f_name ) end on getPropertyDescriptionList set p_list = [ ¬ #movieName: [ #comment: "Movie:", ¬ #format: #string, ¬ #default: " " ], ¬ #playMode: [ #comment: "Play Mode:", ¬ #format: #symbol, ¬ #range: [ #"Go to", #"Play and Return" ], ¬ #default: #"Go to" ], ¬ #whichEvent: [ #comment: "Initializing Event:", ¬ #format: #symbol, ¬ #range: [ #MouseUp, #PrepareFrame, #ExitFrame, #InitGotoMovie ], ¬ #default: #MouseUp ] ¬ ] return p_list end on getBehaviorDescription return ¬ "Plays a new Director movie in the same window." & RETURN & ¬ "• Movie - Enter the file name of a movie to play." & RETURN & ¬ "• Play Mode - Choose Play and Return to return to the current movie when the Playback Head reaches the end of the other movie or when the Play Done behavior is encountered. Choose Go To to play the other movie without returning to the current movie." & RETURN & ¬ "• Initializing Event - Specify the event that triggers the behavior." end